(function(){ 
var getFlashVersion = function() { 
try { 
    if(typeof window.ActiveXObject != 'undefined') {
       return parseInt((new ActiveXObject('ShockwaveFlash.ShockwaveFlash')).GetVariable("$version").split(" ")[1].split(",")[0], 10); 
     }else{
      return parseInt(navigator.plugins["Shockwave Flash"].description.split(' ')[2], 10);
     }
  } catch(e){
    return 0;
  }
};
console.log(getFlashVersion());
})();